<!--
 * @Author: tanlijun 2060803224@qq.com
 * @Date: 2022-11-13 19:44:36
 * @LastEditors: tanlijun 2060803224@qq.com
 * @LastEditTime: 2022-11-13 19:57:50
 * @FilePath: \js基础\js基础第二天\作业\switch-case语句练习.html
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  

  <script>
    let weekday = +prompt('请输入星期数')
    switch(weekday){
      case('星期一'):
        alert('monday')
      break
      case('星期二'):
        alert('tuesday')
      break
      case('星期三'):
        alert('wednesday')
      break
      case('星期四'):
        alert('thursday')
      break
      case('星期五'):
        alert('friday')
      break
      case('星期六'):
        alert('saturday')
      break
      case('星期天'):
        alert('sunday')
      break
      default:
        alert('没有符合条件的')
      break
    }
  </script>
</body>
</html>